package de.baumann.browser.present.duobao

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.api.net.vo.duobao.CYJL
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.duobao.ICYJLView
import de.baumann.browser.model.selectJoinList

class CYJLPresenter : BasePresenter<ICYJLView>() {
    fun cyjl() {
        selectJoinList(view!!.id)
                .subscribe(object : OdinObserver<List<CYJL>>(view) {
                    override fun onSuccess(data: List<CYJL>?) {
                        if (data != null)
                            view?.setList(data)
                    }
                })
    }
}